//
//  YHFMDBViewC.m
//  LyhToolsTest
//
//  Created by LYH on 2019/3/12.
//  Copyright © 2019 LYH.com. All rights reserved.
//

#import "YHFMDBViewC.h"

#import "HMShop.h"
#import "HMShopTool.h"
@interface YHFMDBViewC ()

@end

@implementation YHFMDBViewC

- (void)viewDidLoad {
    [super viewDidLoad];
   
}


- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
//        for (int i = 0; i<100; i++) {
//            HMShop *shop = [[HMShop alloc] init];
//            shop.name = [NSString stringWithFormat:@"枕头--%d", i];
//            shop.price = arc4random() % 200;
//            [HMShopTool addShop:shop];
//        }
    
    NSArray *shops = [HMShopTool shops];
    for (HMShop *shop in shops) {
        NSLog(@"%@ %f", shop.name, shop.price);
    }
    
   
}

@end
